home *** CD-ROM | disk | FTP | other *** search
- class StartPopUp extends PopUp
- {
- var sState;
- var mcRef;
- function StartPopUp(_mcRef)
- {
- super(_mcRef);
- }
- function doShow()
- {
- var _loc3_ = this.sState;
- super.doShow();
- if(_loc3_ == PopUp.sSTATE_IDLE)
- {
- Controller.getRef().pauseGame();
- }
- }
- function doInstantShow()
- {
- var _loc3_ = this.sState;
- super.doInstantShow();
- if(_loc3_ == PopUp.sSTATE_IDLE)
- {
- Controller.getRef().pauseGame();
- }
- }
- function doHide()
- {
- var _loc3_ = this.sState;
- var _loc4_ = this.mcRef.mcState.mcPanel.mcSongs._currentframe;
- super.doHide();
- if(_loc3_ == PopUp.sSTATE_OPENED)
- {
- this.mcRef.mcState.mcPanel.mcSongs.gotoAndPlay(_loc4_);
- Controller.getRef().unPauseGame();
- CTRLGame.getRef().Screen.getInterface().doShow();
- }
- }
- function doInstantHide()
- {
- var _loc3_ = this.sState;
- super.doInstantHide();
- if(_loc3_ == PopUp.sSTATE_OPENED)
- {
- Controller.getRef().unPauseGame();
- CTRLGame.getRef().Screen.getInterface().doShow();
- }
- }
- function clickStartButton()
- {
- Controller.getRef().playClickSound();
- this.doHide();
- }
- function initPopUp()
- {
- this.mcRef.mcState.mcPanel.btnStart.onRollOver = Delegate.create(Main.getRef(),Main.getRef().rollOverButton);
- this.mcRef.mcState.mcPanel.btnStart.onRelease = Delegate.create(this,this.clickStartButton);
- }
- }
-